package com.example.mvvm_base.net;



import com.example.mvvm_base.userbean.BannerEntity;
import com.example.mvvm_base.userbean.CommentEntity;
import com.example.mvvm_base.userbean.FollowEntity;
import com.example.mvvm_base.userbean.GiftEntity;
import com.example.mvvm_base.userbean.LikeEntity;
import com.example.mvvm_base.userbean.RegisterEntity;
import com.example.mvvm_base.userbean.UserEntity;
import com.example.mvvm_base.userbean.VideoEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiService {
  @POST(Const.PARAM_LOGIN)
  Observable<UserEntity> login(@Body RequestBody body);
  @POST(Const.PARAM_REGISTER)
  Observable<RegisterEntity> register(@Body RequestBody body);
  @GET(Const.PARAM_BANNER)
  Observable<BannerEntity> getBanner();
  @GET(Const.PARAM_VIDEO)
  Observable<VideoEntity> getVideo(@Query(Const.VIDEO_CURRENT) int currentPage,@Query(Const.VIDEO_PAGE) int page);
  @POST(Const.PARAM_LIKE)
  Observable<LikeEntity> like(@Query(Const.PARAM_ID) int id);
  @POST(Const.PARAM_UNLIKE)
  Observable<LikeEntity> unLike(@Query(Const.PARAM_ID) int id);
  @GET(Const.PARAM_COMMENT)
  Observable<CommentEntity> comment(@Query(Const.PARAM_ID)int id);
  @POST(Const.PARAM_FOLLOW)
  Observable<FollowEntity> follow(@Body RequestBody body);
  @POST(Const.CANCEL_FOLLOW)
  Observable<FollowEntity> cancelFollow(@Body RequestBody body);
  @POST(Const.SEND_MESSAGE)
  Observable<CommentEntity> sendMessage(@Body RequestBody body);
  @GET(Const.GIFT)
  Observable<GiftEntity> getGift();
}
